package com.baor.controller;


import com.baor.domain.ChangeVo;
import com.baor.service.ChangeService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/change")
public class ChangeController {

    @Autowired
    private ChangeService changeService;

    @RequestMapping("/list")
    public AjaxResult<?> list(@RequestBody Map<String,Object> map){
        return changeService.list(map);
    }

    @RequestMapping("/insert")
    public AjaxResult<?> insert(@RequestBody ChangeVo changeVo){
        return changeService.insert(changeVo);
    }

    @RequestMapping("/update")
    public AjaxResult<?> update(@RequestBody ChangeVo changeVo){
        return changeService.update(changeVo);
    }



}
